<html>﻿<!DOCTYPE html>
<html>
<head>
    <style>
        button { margin:10px; }
        div {
            border:1px solid red;
            margin:10px;
            cursor:pointer;
            width:100px;
        }
    </style>
    <script src="../../../../../../g.alicdn.com/kissy/k/1.4.7/seed.js" tppabs="http://g.alicdn.com/kissy/k/1.4.7/seed.js" data-config="{combine:true}"></script>
</head>
<body>
    
    <button id='c'>clone</button>
    <div>
       点我1
    </div>    
    
<script>
    KISSY.use('core',function (S) {
        var $=S.all,
                i=1,
                c=$("#c"),
                d=$("div");
        d.on("click",function(){
            alert($(this).html()+" clicked");
        });
        c.on("click",function(){
            // true : 克隆后的节点附带源节点的 data 以及事件
            d.clone(false,true).html("点我"+(++i)).appendTo("body");
        });
    });
</script>
</body>
</html>